package com.wang.server.netty.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.FullHttpRequest;

public class LoggerHandler extends SimpleChannelInboundHandler<FullHttpRequest> {

    protected void channelRead0(ChannelHandlerContext channelHandlerContext, FullHttpRequest request) throws Exception {
        System.out.println("asdasd" + request.refCnt());
        System.out.println("----------------请求信息---------------------");
        System.out.println(request);
        System.out.println("----------------请求信息---------------------");
        channelHandlerContext.fireChannelRead(request);
        System.out.println("asdasd" + request.refCnt());
    }
}
